home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Overview / OOPTESample / TESampleGlue.a < prev    next >
Encoding:
Text File  |  1994-11-18  |  1.9 KB  |  69 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    Apple Macintosh Developer Technical Support
  3. ;
  4. ;    MultiFinder-Aware Simple TextEdit Sample Application
  5. ;
  6. ;    OOPTESample
  7. ;
  8. ;    TESampleGlue.a        -    Asm Source
  9. ;
  10. ;    Copyright © 1988, 1989 Apple Computer, Inc.
  11. ;    All rights reserved.
  12. ;
  13. ;    Versions:        
  14. ;                    1.00                    04/89
  15. ;                    1.10                    02/90
  16. ;                    1.11                    10/92
  17. ;
  18. ;    Components:     
  19. ;                    BuildOOPTESample            February 1, 1990
  20. ;                    MTESample.p                    February 1, 1990
  21. ;                    OOPTESample.make            February 1, 1990
  22. ;                    TECommon.h                    February 1, 1990
  23. ;                    TESampleGlue.a                February 1, 1990
  24. ;                    TESample.r                    February 1, 1990
  25. ;                    TMLRules.make                February 1, 1990
  26. ;                    UApplication.p                February 1, 1990
  27. ;                    UApplication.inc1.p            February 1, 1990
  28. ;                    UDocument.p                    February 1, 1990
  29. ;                    UDocument.inc1.p            February 1, 1990
  30. ;                    UTEDocument.p                February 1, 1990
  31. ;                    UTEDocument.inc1.p            February 1, 1990
  32. ;                    UTESample.p                    February 1, 1990
  33. ;                    UTESample.inc1.p            February 1, 1990
  34. ;
  35.  
  36. ;
  37. ;    AsmClickLoop
  38. ;
  39. ;    This routine gets called by the TextEdit Manager from TEClick.
  40. ;    It calls the old, default click loop routine that scrolls the
  41. ;    text, and then calls our own Pascal routine that handles
  42. ;    tracking the scroll bars to follow along.  It doesn't bother
  43. ;    with saving registers A0 and D0, because they are trashed
  44. ;    anyway by TextEdit.
  45. ;
  46.  
  47. AsmClickLoop    PROC        EXPORT
  48.  
  49.             IMPORT        GETOLDCLICKLOOP
  50.             IMPORT        PASCALCLICKLOOP
  51.             
  52.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  53.             
  54.             CLR.L        -(SP)                ; make space for procedure pointer
  55.             JSR            GETOLDCLICKLOOP        ; get the old clickLoop
  56.             MOVEA.L        (SP)+,A0            ; into A0
  57.             
  58.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  59.             JSR            (A0)                ; and execute old clickLoop
  60.  
  61.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  62.             JSR            PASCALCLICKLOOP        ; do our clickLoop
  63.             MOVEQ        #1,D0                ; clear the zero flag so TextEdit keeps going
  64.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  65.             RTS
  66.  
  67.             END 
  68.  
  69.